{% macro group_info(group) -%}
<div data-role="collapsible" data-collapsed="{{ 'true' if group.collapsed else 'false' }}">
    <h4>Group:{{ group.name }}&nbsp;&nbsp; total processes:[ {{ group.processes|length }} ]</h4>
    <ul data-role="listview" data-inset="true">
        {%- for process in group.processes %}
        {% if process.state != 'running' %}
        <li  data-theme="e" style="background-image: linear-gradient(#ffefaa,#ff7a41);">
        {% else %}
        <li  data-theme="d">
        {% endif %}
            <a href="/process/{{ group.name }}/{{ process.name }}" data-rel="dialog" data-transition="pop">
                <img src="/static/images/process.jpg">
                <h2>{{ process.name }}</h2>
                <p>&lsaquo; pid:{{ process.pid }}, status: {{ process.state }} &rsaquo;</p>
            </a>
            <a href="/process/{{ group.name }}/{{ process.name }}" data-rel="dialog" data-transition="pop"></a>
        </li>
        {%- endfor %}
    </ul>
    <div data-role="controlgroup" data-type="horizontal">
        <a href="#anylink" data-mini="true" data-icon="forward" data-role="button" data-shadow="true" data-theme="b">Restart All</a>
        <a href="#anylink" data-mini="true" data-icon="alert" data-role="button" data-shadow="true" data-theme="a">Stop All</a>
    </div>
</div>
{%- endmacro %}

